1. Field of Invention
The present invention relates to a method and apparatus of selectively exchanging control and state information (extensible to exchange of upper layer application data) between network devices. The control and state information is exchanged via a frame that is scalable to support many different applications. More specifically, multiple virtual channels are established between network devices by blocking or control of certain data flows, without blocking the flow of other data through the same link, effectively increasing the bandwidth utilization of the link and the throughput of the network device.
2. Description of Related Art
Many types of network devices are necessary to allow a network to function properly. One such network device is commonly referred to as a switch. A switch is defined as a network component that receives incoming data, stores the data temporarily, and sends the data back out on another port. The switching is accomplished by determining a destination address from the incoming data and sending the data to a port or set of ports associated with the destination address. The control and monitoring of a switch is essential in handling the flow of data in high speed networks. The effective functioning of the switch can be enhanced by control of the traffic through the switch, including monitoring and modification of that traffic. One such function is the control of the selective flow of data through the switch in response to congestion, either internal or external to the switch. This function is also illustrative since it involves the exchange of control and state information between network devices.
Ethernet switches generally support two common mechanisms to handle resource congestion inside the switch. The ingress backpressure mechanism enables the switch to flow control the traffic sent by a remote link partner, i.e. another network connected to the switch. This process is illustrated in FIG. 1. The Ethernet switch 100 keeps track of the number of packets or cells received on each ingress port, such as port #1 connected to remote link partner 110. If the number of bytes or cells received on an ingress port exceeds the configurable ingress back pressure threshold, then the switch exerts back pressure. In another technique, if the number of packets received on an egress port, such as egress port #8 connected to the local or wide area networks 120, exceeds a pre-configured threshold value, then egress generates an ingress back pressure request to the ingress port.
In full duplex mode, this back pressure is achieved by sending a MAC (media access control) control frame called a “pause frame.” Upon receiving the pause frame, the remote link partner stops sending further packets until the timer specified in the pause frame expires or the switch explicitly sends resume frame (pause frame with timer=0). Thus, the entire link remains idle until communication resumes. This flow control mechanism on a full duplex port is specified in the IEEE std. 802.3x, in which it has been specified that an ingress port in a full duplex mode should send pause frames for flow control.
In half duplex mode, this back pressure mechanism can be achieved by enabling a jamming signal and thereby preventing any other station from sending the packet. For ports that are in half duplex mode, this prevents any other station from sending packets to the port. The enabling of jamming signal in half duplex is not a standard, but is done by many of the switch vendors.
These techniques help in avoiding losing any packet that was being received and forwarded by the ingress port and it is generally termed as a zero-loss mode of switching, or as a zero packet loss mode of switching. This process has other side effects, however, including an adverse impact on the switch's throughput and wire speed switch rate.
In addition, Ethernet switches also support a mechanism to handle head of line (HOL) blocking avoidance. This mechanism is illustrated in FIG. 2. The Ethernet switch 200 is connected to remote link partner 210 through an ingress port, such as port #1. The switch 200 keeps track of number of bytes or cells that are sitting on an egress port, such as egress port #8 connected to the local or wide area networks, or any type of networks 220. If the number of bytes or cells or packets exceed the HOL threshold value then all packets going to that egress port are dropped at the ingress port itself. The HOL values are generally configured by software depending on the size of the packet memory. This is generally termed as a HOL avoidance mode of switching. In this HOL avoidance mode, switch performance is sustained by sacrificing packets.
In a zero-loss mechanism, the switch never drops any packet for any traffic scenario, the worst case being all ingress ports are sending packets to one egress port. In this zero-loss mode, the switch will hit the ingress back pressure threshold before hitting the egress HOL limit, so that it exerts Ingress back pressure rather than dropping packet going to the congested port. As such, there are disadvantages to both types of mechanisms used for controlling the flow of data through a switch.
In terms of providing actual control of the flow of data through a network device, the above processes are often crude with respect to the aspects they allow to be controlled. The present implementations can achieve zero-packet loss but the throughput of the network is often decreased. Alternatively, implementations dealing with HOL blocking can sustain throughput, but the loss of packets increases. Thus, there is a need for a mechanism in a network device that achieves zero-loss processing of data that does not have the detrimental effects on the performance of the network device found in the prior art processes. Additionally, there is also a need for selective flow control mechanism that can also be utilized to allow the flow of data having a certain priority to be unimpeded.